<%@ page language="java" contentType="application/vnd.ms-excel; charset=UTF-8"%>
<%@ page import="com.qijia.travel.app.*"  %>
<%@ page import="com.qijia.travel.domain.*"  %>
<%@ page import="com.qijia.travel.vo.*"  %>
<%@page import="com.qijia.travel.helper.ObjectHelper;"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setCharacterEncoding("UTF-8");
TouristManager manager = new TouristManager();
TouristDetailVo vo = (TouristDetailVo)ObjectHelper.ConvertURLRequsetMapToObj(request.getParameterMap(),TouristDetailVo.class);
PageResult pageObj = manager.selectTouristForPage(vo);


response.setContentType("application/vnd.ms-excel;charset=UTF-8");
response.setHeader("Content-disposition","attachment;filename=TouristDetail("+vo.getStDate()+"-"+vo.getEdDate()+").xls"); 

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'touristImport.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
    <table cellspacing="0" cellpadding="0" border="1">
  <tr height="25">
    <th height="25" width="72" bgcolor="#FFFF00">项次</th>
    <th width="84" bgcolor="#FFFF00">导游姓名</th>
    <th width="84" bgcolor="#FFFF00">导游类型</th>
    <th width="95" bgcolor="#FFFF00">起始日期</th>
    <th width="95" bgcolor="#FFFF00">截止日期</th>
    <th width="95" bgcolor="#FFFF00">起止天数</th>
    <th width="93" bgcolor="#FFFF00">团社</th>
    <th width="193" bgcolor="#FFFF00">团编号</th>
    <th width="54" bgcolor="#FFFF00">团型</th>
    <th width="54" bgcolor="#FFFF00">客源</th>
    <th width="54" bgcolor="#FFFF00">人数</th>
  </tr>
  <%
  int i=0;
  for(Object obj :pageObj.getPageList()){ 
     i++;
     TouristWorkDetail detail = (TouristWorkDetail)obj; 
  %>
  <tr height="19">
    <td height="19" align="right"><%=i%></td>
    <td><%=detail.getGuideName()%></td>
    <td><%=detail.getGuideType()==null?"":detail.getGuideType()+"线"%></td>
    <td><%=detail.getStartDt()==null?"":detail.getStartDt()%></td>
    <td><%=detail.getEndDt()==null?"":detail.getEndDt()%></td>
    <td align="right"><%=detail.getContinuedDate()==null?"":detail.getContinuedDate()%></td>
    <td align="right"><%=detail.getAgencyMissionName()==null?"":detail.getAgencyMissionName()%></td>
    <td><%=detail.getTouristGroupSn() %></td>
    <td><%=detail.getTouristGroupType()==null?"":detail.getTouristGroupType()%></td>
    <td><%=detail.getCustomerSourse()==null?"":detail.getCustomerSourse()%></td>
    <td align="right"><%=detail.getCustomerNum()==null?"":detail.getCustomerNum()%></td>
  </tr>
  <%} %>
</table>
  </body>
</html>
